package action.PetAction;

import javax.servlet.http.HttpSession;

import model.dao.PetDao;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

import domain.PetInfo;

public class DeletePet extends ActionSupport {

	public String execute() throws Exception {
		HttpSession session = ServletActionContext.getRequest().getSession();
		PetInfo one = (PetInfo) session.getAttribute("petinfo");
		PetDao petdao = new PetDao();
		System.out.println(one.getPet_Id()+one.getPet_Name());
		petdao.deletePet(one.getPet_Id(), one.getPet_Name());
		return SUCCESS;
	}

}
